﻿using IdentityServer4.EntityFramework.Entities;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Batman.Identity
{
    public class CreateClientInput
    {
        /// <summary>
        /// 应用名称
        /// </summary>
        [Required(ErrorMessage = "请设置应用名称")]
        public string ClientName { get; set; }

        public string ClientId { get; set; }

        /// <summary>
        /// 应用是否可用的
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 应用描述
        /// </summary>
        [Required(ErrorMessage = "请填写应用描述")]
        public string Description { get; set; }

        /// <summary>
        /// 秘钥
        /// </summary>
        [Required(ErrorMessage = "请填写秘钥")]
        public string Secret { get; set; }

        /// <summary>
        /// 登录跳转地址
        /// </summary>
        [Required(ErrorMessage = "请填写登录地址")]
        public string RedirectUri { get; set; }

        /// <summary>
        /// 退出跳转地址
        /// </summary>
        [Required(ErrorMessage = "请填退出跳转地址")]
        public string PostLogoutRequrectUri { get; set; }

        public List<ClientScope> AllowedScopes { get; set; }
    }
}
